home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / ds5000.md / RCS / stdarg.h,v < prev    next >
Encoding:
Text File  |  1992-02-05  |  2.3 KB  |  99 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     92.02.05.15.16.24;  author mottsmth;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     92.02.05.15.00.44;  author mottsmth;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Original ansi stdarg.h file from Ultrix
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @Change _VA_LIST_ to _VA_LIST to agree with Sprite's stdio.h
  28. @
  29. text
  30. @/*    @@(#)stdarg.h    4.3    (ULTRIX)    9/4/90    */
  31. /* ------------------------------------------------------------------ */
  32. /* | Copyright Unpublished, MIPS Computer Systems, Inc.  All Rights | */
  33. /* | Reserved.  This software contains proprietary and confidential | */
  34. /* | information of MIPS and its suppliers.  Use, disclosure or     | */
  35. /* | reproduction is prohibited without the prior express written   | */
  36. /* | consent of MIPS.                                               | */
  37. /* ------------------------------------------------------------------ */
  38. /* $Header: /sprite/src/lib/include/ds3100.md/RCS/stdarg.h,v 1.1 92/02/05 15:00:44 mottsmth Exp Locker: mottsmth $ */
  39. /*    @@(#)stdarg.h    1.1    */
  40.  
  41. /* 4.8 Variable arguments */
  42.  
  43. #include <ansi_compat.h>
  44. #ifndef __STDARG_H
  45. #define __STDARG_H
  46.  
  47. #ifndef _VA_LIST /* Was _VA_LIST_. Changed to agree with Sprite's stdio.h */
  48. #define _VA_LIST
  49. typedef char *va_list;
  50. #endif /* _VA_LIST */
  51.  
  52. #define va_end(list)
  53.  
  54. #ifdef __host_mips
  55.  
  56.     /* va_start makes list point past the parmN */
  57. #define va_start(list, parmN) (list = ((va_list)&parmN + sizeof(parmN)))
  58.  
  59.         /* va_arg aligns list and points past data */
  60. #define va_arg(list, mode) ((mode *)(list =\
  61.  (va_list) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\
  62.  (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1]
  63.  
  64. /*  +++++++++++++++++++++++++++++++++++++++++++
  65.     Because of parameter passing conventions in C:
  66.     use mode=int for char, and short types
  67.     use mode=double for float types
  68.     use a pointer for array types
  69.     +++++++++++++++++++++++++++++++++++++++++++ */
  70.  
  71. #else /* vax */
  72.  
  73. #define va_start(list, parmN) list = (va_list)((int)&parmN + sizeof(parmN))
  74. #define va_arg(list, mode) ((mode *)(list += sizeof(mode)))[-1]
  75.  
  76. #endif
  77.  
  78. #endif
  79.  
  80. @
  81.  
  82.  
  83. 1.1
  84. log
  85. @Initial revision
  86. @
  87. text
  88. @d9 1
  89. a9 1
  90. /* $Header: stdarg.h,v 2010.6.1.5 89/11/29 22:41:27 bettina Exp $ */
  91. d18 2
  92. a19 2
  93. #ifndef _VA_LIST_
  94. #define _VA_LIST_
  95. d21 1
  96. a21 1
  97. #endif /* _VA_LIST_ */
  98. @
  99.